package kr.hkit.powerjava.chther14;

import java.awt.GridLayout;
import java.awt.HeadlessException;

import javax.swing.JButton;
import javax.swing.JFrame;

public class Myframe extends JFrame {
	public Myframe()throws HeadlessException{
	setTitle("GridLayoutTest");
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setLayout(new GridLayout(0,3));
	
	add(new JButton("Button1"));
	add(new JButton("Button2"));
	add(new JButton("Button3"));
	add(new JButton("B4"));
	add(new JButton("Long Button5"));
	
	pack();
	setVisible(true);
	}
}
